﻿#ifndef __CC_APP_H__
#define __CC_APP_H__
#include "cocos2d.h"


/** Do initialization.
*/
void	appInit(cocos2d::CCApplication* ccapp);

/** Run.
*/
int	appRun(cocos2d::CCApplication* ccapp);

/** Exit.
*/
void	appExit(cocos2d::CCApplication* ccapp);



#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
#define COCOS2D_WIMMAIN(runApp)										\
	extern "C" int WINAPI wWinMain(HINSTANCE hInstance,				\
	HINSTANCE hPrevInstance,										\
	LPTSTR lpCmdLine,												\
	int nCmdShow)													\
{																	\
	UNREFERENCED_PARAMETER(hPrevInstance);							\
	UNREFERENCED_PARAMETER(lpCmdLine);								\
	appInit(runApp);												\
	int ret = appRun(runApp);										\
	appExit(runApp);												\
	return ret;														\
}					

#define COCOS2D_WIMMAIN_INIT







#endif 
#endif //__CC_APP_H__
